package com.client;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;
import java.util.concurrent.TimeUnit;

@SpringBootApplication
@RestController
@RequestMapping("/client")
public class ClientApplication {

    private static final Random RANDOM = new Random();

    @GetMapping("/mock")
    public String mock() throws InterruptedException {
        TimeUnit.MILLISECONDS.sleep(RANDOM.nextInt(1000));
        return "ok";
    }

    public static void main(String[] args) {
        SpringApplication.run(ClientApplication.class, args);
    }

}
